package com.example.springaop.Controller;

import com.example.springaop.Aspect.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/test")
@RestController
public class TestController {
    @RequestMapping("/t1")
    public String t1() {
        log.info("执行t1");
        return "t1";
    }
    @MyAspect
    @RequestMapping("/t2")
    public String t2() {
        log.info("t2");
        return "t2";
    }
    @RequestMapping("/t3")
    public String t3() {
        log.info("t3");
        int a=10/0;
        return "t3";
    }
}
